//
//  HomeProductCell.m
//  YunGou
//
//  Created by macbook on 16/5/17.
//  Copyright © 2016年 macbook. All rights reserved.
//

#import "HomeProductCell.h"

@interface HomeProductCell ()

@end

@implementation HomeProductCell

- (void)awakeFromNib {
    _leftProgressView.progress = 0.5;
    _rightProgressView.progress = 0.3;
    UITapGestureRecognizer *leftTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    [_leftView addGestureRecognizer:leftTap];
    UITapGestureRecognizer *rightTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    [_rightView addGestureRecognizer:rightTap];
}

- (IBAction)addShopCartClick:(UIButton *)sender {
    if (self.addShopCartBlock) {
        self.addShopCartBlock(sender.tag);
    }
}

- (void)handleTap:(UITapGestureRecognizer *)tap{
    if (self.homeProductCellBlock) {
        self.homeProductCellBlock(tap.view);
    }
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
